const app = getApp()
import { custom } from '../../api/design'

Page({
  data: {
    back: true,
    title: '',
    design: [],
    loading: true
  },
  onLoad (options) {
    this.setData({ loading: true })
    custom(options.id).then(res => {
      const { data } = res
      this.setData({
        title: data.title,
        design: data.content
      })
    })
      .finally(() => {
        this.setData({ loading: false })
      })
  },
  onPullDownRefresh () { /* 监听用户下拉动作*/ },
  onReachBottom () { /* 页面上拉触底事件的处理函数*/ },
  onShareAppMessage (event) {
    return {
      path: '/pages/index/index'
    }
  }
})